package com.dy.drp.mapper;

import com.dy.drp.dto.LoginDto;
import com.dy.drp.dto.UserDto;
import com.dy.drp.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.drp.util.PageUtil;
import com.dy.drp.util.SelectUtil;
import com.dy.drp.vo.UserAddVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author dy
 * @since 2022-04-02
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    List<LoginDto> getOneUserAndPowerByUser(User user);

    List<UserDto> selectOnePageUser(PageUtil<UserDto> pageUtil);

    Integer selectUserCount();

    List<UserDto> selectOnePageUserByInfo(SelectUtil selectUtil);

    Integer selectUserCountByInfo(SelectUtil selectUtil);

    Integer insertUser(UserDto userDto);

    UserDto selectOneUserByName(SelectUtil selectUtil);
}
